<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <!-- basic styles -->
        <link href="../../assets/js/plugin/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
        <link rel="stylesheet" href="../../assets/css/font-awesome.min.css" />
        <link type="text/css" rel="stylesheet" href="../../assets/js/plugin/jquery-ui/css/jquery-ui.css" />
        <!--<link href="../../assets/js/plugin/datepicker/css/jquery-datepicker.css" rel="stylesheet" media="screen" />-->
        <!--<link href="../../assets/js/plugin/check/check.css" rel="stylesheet" media="screen" />-->
        <link rel="stylesheet" href="../../assets/css/ace.min.css" />
        <link rel="stylesheet" type="text/css" media="all" href="../../assets/js/date-time/daterangepicker-bs3.css"/>
        <style>
            .controls span.help-inline {
                font-size: 12px;
                color: #999
            }
            .modal-body{max-height: 200px;}
            .form-horizontal .row-fluid .left{
                float: left;
                width: 50%;
                margin: 0px;
                padding: 0px;
            }
            .header{padding-left:20px; margin-top: 20px;}
            .row-fluid{border-bottom: 1px solid #d5e3ef;margin-bottom: 10px}
        </style>

    </head>

    <body>
        <div class="main-container">
            <h4 style="padding-left:20px; margin-top: 20px;" class='header smaller lighter blue'>通用类流量标记策略</h4>
            <form class="form-horizontal">  
                <div class="control-group">
                    <label class="control-label" for="policy_desc">策略名称:</label>
                    <div class="controls">
                        <input class="policy_desc" type="text" name="1" id="policy_desc" disabled="disabled" placeholder="" required>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="AppType">差异化应用类型：</label>
                    <div class="controls">
                        <select class="AppType" id="AppType">
                            <option value="0">未识别应用</option>
                            <option value="1">Web 视频类</option>
                            <option value="2">其它 Web 类</option>
                            <option value="3">P2PStream</option>
                            <option value="4">P2PDownload</option>
                            <option value="5">VideoStream</option>
                            <option value="6">Download</option>
                            <option value="7">Email </option>
                            <option value="8">IM</option>
                            <option value="9">Game</option>
                            <option value="10">VoIP </option>
                            <option value="11">电信自营</option>
                            <option value="12">其它</option>
                        </select>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="AppID">差异化应用编号：</label>
                    <div class="controls">
                        <input class="AppID" value="0" name="AppID" type="text" id="AppID" required/>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="AppName">差异化应用名称：</label>
                    <div class="controls">
                        <input type="text"  id="AppName" name="AppName" class="AppName" required>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="QoS_Label_Up">针对本应用上行流量的差异化标记值：</label>
                    <div class="controls">
                        <input type="text"  id="QoS_Label_Up" name="QoS_Label_Up" class="QoS_Label_Up number" required>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="QoS_Label_Dn">针对本应用下行流量的差异化标记值：</label>
                    <div class="controls">
                        <input type="text"  id="QoS_Label_Dn" name="QoS_Label_Dn" class="QoS_Label_Dn number" required>
                    </div>
                </div>
                <div class="control-group">
                    <div class="controls">
                        <button type="button" class="btn btn-sm btn-danger up">
                            <i class="icon-arrow-left"></i>
                            查看上一个版本
                        </button>
                        &nbsp; &nbsp; &nbsp;
                        <button type="button" class="btn btn-sm btn-danger next" disabled="">
                            <i class="icon-arrow-right"></i>
                            查看下一个版本
                        </button>
                        &nbsp; &nbsp; &nbsp;
                        <button type="button" class="btn btn-sm btn-danger" onclick="previous();">
                            <i class="icon-undo"></i>
                            返回
                        </button>
                    </div>
                </div>
            </form>
        </div>

        <script src="../../assets/js/jquery.js"></script>
        <script src="../../assets/js/plugin/bootstrap/js/bootstrap.min.js"></script>
        <script type='text/javascript' src="../../assets/js/plugin/jquery-ui/jquery-ui.js"></script>
        <!--<script src="../../assets/js/plugin/datepicker/js/jquery-datepicker.js"></script>-->
        <script src="../../assets/js/date-time/moment.js"></script>
        <script src="../../assets/js/date-time/daterangepicker.js"></script>
        <script src="../../assets/js/plugin/menu/menu.js"></script>
        <script src="../../assets/js/jquery.validate.js"></script>
        <script src="../../assets/js/jquery.validate-util.js"></script>
        <!--<script src="../../assets/js/logic/overlayer.js"></script>-->
        <script src="../../assets/js/Base64.js"></script>
        <script src="logic.js"></script>
        <script type="text/javascript">
                            var id = getQueryString("id");
                            var policyArray, policyAmount, actualQuantity;
                            $(function() {
                                getAllPolicy();
                                //初始化数据
                                actualQuantity = policyAmount - 1;
                                show_oldPolicy(policyArray, actualQuantity);
                                if (actualQuantity == 0) {
                                    $(".up").attr("disabled", "");
                                }
                                if (actualQuantity == (policyAmount - 1)) {
                                    $(".next").attr("disabled", "");
                                }
                                $(".up").click(function() {
                                    actualQuantity = actualQuantity - 1;
                                    show_oldPolicy(policyArray, actualQuantity);
                                    $(".next").removeAttr("disabled");
                                    if (actualQuantity == 0) {
                                        $(".up").attr("disabled", "");
                                    }
                                });
                                $(".next").click(function() {
                                    actualQuantity = actualQuantity + 1;
                                    show_oldPolicy(policyArray, actualQuantity);
                                    $(".up").removeAttr("disabled");
                                    if (actualQuantity == (policyAmount - 1)) {
                                        $(".next").attr("disabled", "");
                                    }
                                });
                            })
        </script>
    </body>
</html>
